<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible"
        content="ie=edge">
  <title>angular事件</title>
  <script src="../lib/angular.1.7.8.js"></script>
</head>

<body>
  <dv ng-app="myApp"
      ng-controller="myCtrl">
    <button ng-click="count=count-1">减</button>
    <button ng-click="count=count+1">加</button>
    <p>{{count}}</p>
    <button ng-click="isShow = !isShow">ng-show toggle</button>
    <p ng-show="isShow">显示{{isShow}}</p>
    <p ng-show="!isShow">隐藏{{isShow}}</p>
    <hr />
    <button ng-click="isHide = !isHide">ng-hide toggle</button>
    <p ng-hide="isHide">隐藏{{isHide}}</p>
    <p ng-hide="!isHide">显示{{isHide}}</p>
  </dv>

  <script>
    var app = angular.module('myApp', [])
    app.controller('myCtrl', ($scope) => {
      $scope.count = 0
      $scope.isShow = true
    })
  </script>
</body>

</html>
